load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "spanconfigkvaccessor",
    srcs = [
        "dummy.go",
        "kvaccessor.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigkvaccessor",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv",
        "//pkg/roachpb",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/spanconfig",
        "//pkg/sql/isql",
        "//pkg/sql/parser",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sessiondata",
        "//pkg/util/hlc",
        "//pkg/util/log",
        "//pkg/util/protoutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "spanconfigkvaccessor_test",
    srcs = [
        "kvaccessor_test.go",
        "main_test.go",
        "validation_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":spanconfigkvaccessor"],
    deps = [
        "//pkg/base",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/spanconfig",
        "//pkg/spanconfig/spanconfigtestutils",
        "//pkg/sql/isql",
        "//pkg/testutils",
        "//pkg/testutils/datapathutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_datadriven//:datadriven",
        "@com_github_stretchr_testify//require",
    ],
)
